package com.be.beadmin.basicData.repository;

import com.be.beadmin.basicData.entity.Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface MenuRepository extends JpaRepository<Menu,String>, JpaSpecificationExecutor<Menu> {
    Menu findMenuByNameAndDelete(String name, Integer delete);

    Menu findMenuById(String id);


    Set<Menu> findMenusByDeleteAndIdIn(Integer isDelete, List<String> ids);


    List<Menu> findMenusByDeleteAndParentMenuOrderBySeq(Integer isDelete, Menu menu);

    Menu findMenuByCodeAndDelete(String code,Integer isDelete);
}
